<?php
require('DB.php');
require('PaypalIPN.php');

use PaypalIPN;

$pp = json_encode($_REQUEST);

$ipn = new PaypalIPN();
$ipn->useSandbox();
$verified = $ipn->verifyIPN();
if ($verified) {
    DB::insert($pp);
}

header("HTTP/1.1 200 OK");
